
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<HTML>

<HEAD>
   <TITLE>failed_c</TITLE>
</HEAD>

<BODY style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<A name="TOP"></A>

<table style="text-align: left; margin-left: auto; margin-right: auto; width: 800px;"
 border="0" cellpadding="5" cellspacing="2">
  <tbody>
    <tr>
      <td style="background-color: rgb(153, 153, 153); vertical-align: middle; text-align: center;">
      <div align="right"> 
      <small><small><a href="index.html">Index Page</a></small></small>
      </div>
      <b>failed_c</b> </td>
    </tr>

    <tr>
      <td style="vertical-align: top;">

<small><div align="center">
<A HREF="index.html#A">A</A>&nbsp;
<A HREF="index.html#B">B</A>&nbsp;
<A HREF="index.html#C">C</A>&nbsp;
<A HREF="index.html#D">D</A>&nbsp;
<A HREF="index.html#E">E</A>&nbsp;
<A HREF="index.html#F">F</A>&nbsp;
<A HREF="index.html#G">G</A>&nbsp;
<A HREF="index.html#H">H</A>&nbsp;
<A HREF="index.html#I">I</A>&nbsp;
<A HREF="index.html#J">J</A>&nbsp;
<A HREF="index.html#K">K</A>&nbsp;
<A HREF="index.html#L">L</A>&nbsp;
<A HREF="index.html#M">M</A>&nbsp;
<A HREF="index.html#N">N</A>&nbsp;
<A HREF="index.html#O">O</A>&nbsp;
<A HREF="index.html#P">P</A>&nbsp;
<A HREF="index.html#Q">Q</A>&nbsp;
<A HREF="index.html#R">R</A>&nbsp;
<A HREF="index.html#S">S</A>&nbsp;
<A HREF="index.html#T">T</A>&nbsp;
<A HREF="index.html#U">U</A>&nbsp;
<A HREF="index.html#V">V</A>&nbsp;
<A HREF="index.html#W">W</A>&nbsp;
<A HREF="index.html#X">X</A>&nbsp;
</div></small>
       <br>
       <table style="text-align: left; width: 60%; margin-left: auto; margin-right: auto;"
       border="0" cellspacing="2" cellpadding="2">
        <tbody>
          <tr>
            <td style="width: 50%; text-align: center;">
            <small>
              <a href="#Procedure">Procedure<br></a>
              <a href="#Abstract">Abstract<br></a>
              <a href="#Required_Reading">Required_Reading<br></a>
              <a href="#Keywords">Keywords<br></a>
              <a href="#Brief_I/O">Brief_I/O<br></a>
              <a href="#Detailed_Input">Detailed_Input<br></a>

              </small>
              </td>
              <td style="vertical-align: top; width: 50%; text-align: center;">
              <small>               <a href="#Detailed_Output">Detailed_Output<br></a>
              <a href="#Parameters">Parameters<br></a>
              <a href="#Exceptions">Exceptions<br></a>
              <a href="#Files">Files<br></a>
              <a href="#Particulars">Particulars<br></a>
              <a href="#Examples">Examples<br></a>

              </small>
              </td>
              <td style="vertical-align: top; width: 50%; text-align: center;">
              <small>               <a href="#Restrictions">Restrictions<br></a>
              <a href="#Literature_References">Literature_References<br></a>
              <a href="#Author_and_Institution">Author_and_Institution<br></a>
              <a href="#Version">Version<br></a>
              <a href="#Index_Entries">Index_Entries<br></a>
             </small>
            </td>
          </tr>
        </tbody>
</table>

<h4><a name="Procedure">Procedure</a></h4>
<PRE>
   SpiceBoolean failed_c ()

</PRE>
<h4><a name="Abstract">Abstract</a></h4>
<PRE>
   True if an error condition has been signalled via <a href="sigerr_c.html">sigerr_c</a>.
   <b>failed_c</b> is the CSPICE status indicator.
</PRE>
<h4><a name="Required_Reading">Required_Reading</a></h4>
<PRE>
   <a href="../req/error.html">ERROR</a>
</PRE>
<h4><a name="Keywords">Keywords</a></h4>
<PRE>
   ERROR


</PRE>
<h4><a name="Brief_I/O">Brief_I/O</a></h4>
<PRE>
   VARIABLE  I/O  DESCRIPTION
   --------  ---  --------------------------------------------------

   The function takes the value SPICETRUE if an error condition
   was detected; it is SPICEFALSE otherwise.
</PRE>
<h4><a name="Detailed_Input">Detailed_Input</a></h4>
<PRE>
   None.
</PRE>
<h4><a name="Detailed_Output">Detailed_Output</a></h4>
<PRE>
   Please read the required reading file before reading this!

   The value taken by <b>failed_c</b> indicates status.

   The status value applies to the CSPICE routines,
   and to any other routines which call the status-setting
   routine, <a href="sigerr_c.html">sigerr_c</a>.

   When <b>failed_c</b> has the value, SPICETRUE, an error condition
   exists.   SPICEFALSE means &quot;no error.&quot;

   More specifically, when <b>failed_c</b> has the value SPICETRUE,
   some routine has indicated an error by calling the
   CSPICE routine, <a href="sigerr_c.html">sigerr_c</a>.  All CSPICE routines
   which can detect errors do this.  Non-CSPICE
   routines may also reference <a href="sigerr_c.html">sigerr_c</a> if desired.

   When <b>failed_c</b> has the value SPICEFALSE, either no routine
   has yet signalled an error via <a href="sigerr_c.html">sigerr_c</a>, or the status
   has been reset using, what else, <a href="reset_c.html">reset_c</a>.

   <b>failed_c</b> is initialized to have the value, SPICEFALSE
   This indicates a  &quot;no error&quot; status.

   See &quot;particulars&quot; below for (slightly) more information.
</PRE>
<h4><a name="Parameters">Parameters</a></h4>
<PRE>
   None.
</PRE>
<h4><a name="Exceptions">Exceptions</a></h4>
<PRE>
   None.

   However, this routine is part of the CSPICE error
   handling mechanism.
</PRE>
<h4><a name="Files">Files</a></h4>
<PRE>
   None.
</PRE>
<h4><a name="Particulars">Particulars</a></h4>
<PRE>
   See the required reading file for details of error
   processing.  However, here are some notes:

   When any CSPICE routine detects an error, the
   status is set to indicate an error condition via
   a call to <a href="sigerr_c.html">sigerr_c</a>.   After <a href="sigerr_c.html">sigerr_c</a>
   returns, further calls to <b>failed_c</b> will return the
   value, SPICETRUE, indicating an error condition.

   Non-CSPICE routines may also call <a href="sigerr_c.html">sigerr_c</a> to indicate
   an error condition; <b>failed_c</b> will reflect such calls
   as well.

   It is possible to re-set the error status to indicate
   &quot;no error&quot; using the CSPICE routine, <a href="reset_c.html">reset_c</a> (see).

   The effect on <b>failed_c</b> of resetting the status is
   that <b>failed_c</b> will again return the value SPICEFALSE,
   indicating &quot;no error.&quot;

   One of the main virtues of the CSPICE error
   handling mechanism is that you don't HAVE to test the
   error status after every call to a CSPICE routine.
   If you set the error handling mode to &quot;RETURN&quot;, using
   the routine, <a href="erract_c.html">erract_c</a>, CSPICE routines won't crash
   when an error occurs; following the detection of the
   error, each routine will return immediately upon entry.
   Therefore, you call several CSPICE routines in a
   row, and just test status at the end of the sequence
   of calls, if you wish.  See &quot;examples&quot; below.
</PRE>
<h4><a name="Examples">Examples</a></h4>
<PRE>
   1.  Here's an example of a simple call to <a href="rdtext_c.html">rdtext_c</a>, followed
       by a test of the status.


           /.
           We read a line of text from file SPUD.DAT:
           ./

          <a href="rdtext_c.html">rdtext_c</a> ( &quot;SPUD.DAT&quot;, line, LENOUT, &amp;eof );

          if ( <b>failed_c</b>() )
             {

             /. An error occurred during the read. ./

             [respond to error here]

             }


   2.    Here's an example in which we don't want to
         put the error test inside our loop.  We just
         test the error status after the loop terminates.
         We can do this because we (that is, you, the user)
         have made the call,

                <a href="erract_c.html">erract_c</a> ( &quot;RETURN&quot;, LENOUT, msg );

         prior to execution of the following code.  If an
         error does occur, the remaining calls to <a href="rdtext_c.html">rdtext_c</a>
         will have no effect.  Here's the example:

         /.
         We read the first 5000 lines of a file, or until
         EOF is reached, whichever comes first:
         ./

         lcount = 0;

         do {

            <a href="rdtext_c.html">rdtext_c</a> ( &quot;SPUD.DAT&quot;, line[lcount], LENOUT, &amp;eof );

            lcount++;

            }
         while (  !( eof ) &amp;&amp; ( lcount &lt;= 5000 )  );


         if ( <b>failed_c</b>() )
             {

             /. An error occurred during the read. ./

             [respond to error here]

             }
</PRE>
<h4><a name="Restrictions">Restrictions</a></h4>
<PRE>
   This routine automatically detects errors occurring in
   the CSPICE code.  To make this routine work for your own
   routines, your routines must call <a href="sigerr_c.html">sigerr_c</a> to report errors.
</PRE>
<h4><a name="Literature_References">Literature_References</a></h4>
<PRE>
   None.
</PRE>
<h4><a name="Author_and_Institution">Author_and_Institution</a></h4>
<PRE>
   N.J. Bachman    (JPL)
   H.A. Neilan     (JPL)
   E.D. Wright     (JPL)
</PRE>
<h4><a name="Version">Version</a></h4>
<PRE>
   -CSPICE Version 1.0.1, 08-FEB-1998 (EDW)

      Minor corrections to header information.

   -CSPICE Version 1.0.0, 25-OCT-1997 (EDW)
</PRE>
<h4><a name="Index_Entries">Index_Entries</a></h4>
<PRE>
   error status indicator
</PRE>
<h4>Link to routine failed_c source file <a href='../../../src/cspice/failed_c.c'>failed_c.c</a> </h4>

      </td>
    </tr>
  </tbody>
</table>

   <pre>Wed Jun  9 13:05:23 2010</pre>

</body>
</html>

